***** Replication code for Franchino, Fabio, and Camilla Mariotto. “Noncompliance Risk, Asymmetric Power and the Design of Enforcement of the European Economic Governance”. European Union Politics.

***** Online Appendix Section 3.2 Re-categorization of issues test
* Preparation stage 1  (you can skip this stage)
version 15
pause on
use conflict_data_FC2.dta, clear

* Coding primary and secondary dimensions
gen dim_d_nat=1 if discr_nat!=.
gen dim_d_cou=1 if discr_cou!=.
gen dim_d_com=1 if discr_com!=.
label variable dim_d_nat "Primary (1) or secondary (2) dimension"
label variable dim_d_cou "Primary (1) or secondary (2) dimension"
label variable dim_d_com "Primary (1) or secondary (2) dimension"
label define dimension 1 "primary" 2 "secondary"
label values dim_d_nat dimension
label values dim_d_cou dimension
label values dim_d_com dimension
order discr_nat dim_d_nat, after(tighten)
order discr_cou dim_d_cou, after(constr_cou)
order discr_com dim_d_com, after(constr_com)

* Issue 1 - added National Discretion (switched)
replace dim_d_nat=2 if issue_id==1
replace discr_nat=discr_com if issue_id==1
recode discr_nat (1 = 3) (3 = 1) if issue_id==1
* list country discr_nat dim_d_nat discr_com dim_d_com if issue_id==1
* Generalized structural equation model: Three-levels, Random intercepts
gsem (discr_com <- c.debt_gdp c.nbi c.nbi#c.debt_gdp i.eurozone i.crisis@0 i.cou_pres c.gov_lr c.gov_eu c.goodEU_net_6 i.comm_s M1[act] M2[act>issue_id], ologit ) ///
	 (discr_cou <- c.debt_gdp c.nbi c.nbi#c.debt_gdp i.eurozone i.crisis@0 i.cou_pres c.gov_lr c.gov_eu c.goodEU_net_6 i.comm_s M1[act] M2[act>issue_id], ologit ) ///
     (discr_nat <- c.debt_gdp                        i.eurozone i.crisis   i.cou_pres c.gov_lr c.gov_eu c.goodEU_net_6 i.comm_s M1[act] M2[act>issue_id], ologit ), vce(robust)
matrix b1=e(b)		
matrix list b1	
matrix b = b1
clear
svmat b
save robtest_iss_FC.dta, replace

** Next issues
clear
version 15
pause on
use conflict_data_FC2.dta, clear

* Coding primary and secondary dimensions
gen dim_d_nat=1 if discr_nat!=.
gen dim_d_cou=1 if discr_cou!=.
gen dim_d_com=1 if discr_com!=.
label variable dim_d_nat "Primary (1) or secondary (2) dimension"
label variable dim_d_cou "Primary (1) or secondary (2) dimension"
label variable dim_d_com "Primary (1) or secondary (2) dimension"
label define dimension 1 "primary" 2 "secondary"
label values dim_d_nat dimension
label values dim_d_cou dimension
label values dim_d_com dimension
order discr_nat dim_d_nat, after(tighten)
order discr_cou dim_d_cou, after(constr_cou)
order discr_com dim_d_com, after(constr_com)

* Issue 4 - added National Discretion
replace dim_d_nat=2 if issue_id==4
replace discr_nat=discr_cou if issue_id==4
* list country discr_nat dim_d_nat discr_cou dim_d_cou if issue_id==4
do "gsem robustness issue_sub_FC2.do"

* Issue 5 - added Council Discretion (switched)
replace dim_d_cou=2 if issue_id==5
replace discr_cou=discr_com if issue_id==5
recode discr_cou (1 = 3) (3 = 1) if issue_id==5
* list country discr_cou dim_d_cou discr_com dim_d_com if issue_id==5
do "gsem robustness issue_sub_FC2.do"

* Issue 6 - added National Discretion
replace dim_d_nat=2 if issue_id==6
replace discr_nat=discr_cou if issue_id==6
* list country discr_nat dim_d_nat discr_cou dim_d_cou if issue_id==6
do "gsem robustness issue_sub_FC2.do"

* Issue 7 - added National Discretion
replace dim_d_nat=2 if issue_id==7
replace discr_nat=discr_cou if issue_id==7
* list country discr_nat dim_d_nat discr_cou dim_d_cou if issue_id==7
do "gsem robustness issue_sub_FC2.do"

* Issue 9 - added National Discretion
replace dim_d_nat=2 if issue_id==9
replace discr_nat=discr_cou if issue_id==9
* list country discr_nat dim_d_nat discr_cou dim_d_cou if issue_id==9
do "gsem robustness issue_sub_FC2.do"

* Issue 10 - no secondary dimension

* Issue 11 - added National Discretion
replace dim_d_nat=2 if issue_id==11
replace discr_nat=discr_cou if issue_id==11
* list country discr_nat dim_d_nat discr_cou dim_d_cou if issue_id==11
do "gsem robustness issue_sub_FC2.do"

* Issue 14 - added National Discretion
replace dim_d_nat=2 if issue_id==14
replace discr_nat=discr_cou if issue_id==14
* list country discr_nat dim_d_nat discr_cou dim_d_cou if issue_id==14
do "gsem robustness issue_sub_FC2.do"

* Issue 15 - added Commission Discretion (switched)
replace dim_d_com=2 if issue_id==15
replace discr_com=discr_nat if issue_id==15
recode discr_com (1 = 3) (3 = 1) if issue_id==15
* list country discr_com dim_d_com discr_nat dim_d_nat if issue_id==15
do "gsem robustness issue_sub_FC2.do"

* Issue 30 - no secondary dimension

* Issue 31 - added Commission Discretion (switched)
replace dim_d_com=2 if issue_id==31
replace discr_com=discr_cou if issue_id==31
recode discr_com (1 = 3) (3 = 1) if issue_id==31
* list country discr_com dim_d_com discr_cou dim_d_cou if issue_id==31
do "gsem robustness issue_sub_FC2.do"

* Issue 31 - added National Discretion
replace dim_d_nat=2 if issue_id==31
replace discr_nat=discr_cou if issue_id==31
* list country discr_nat dim_d_nat discr_cou dim_d_cou if issue_id==31
do "gsem robustness issue_sub_FC2.do"

* Issue 36 - added Council Discretion (switched)
replace dim_d_cou=2 if issue_id==36
replace discr_cou=discr_com if issue_id==36
recode discr_cou (1 = 3) (3 = 1) if issue_id==36
* list country discr_cou dim_d_cou discr_com dim_d_com if issue_id==36
do "gsem robustness issue_sub_FC2.do"

* Issue 37 - no secondary dimension

* Issue 38 - no secondary dimension

* Issue 39 - no secondary dimension

* Issue 40 - no secondary dimension

